package com.luych.toolbox.common.feign.view.gateway.center;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

@ApiModel("文件数据返回")
public class FileView {

    @ApiModelProperty("名称")
    private String uuid;
    @ApiModelProperty("创建时间")
    private Date createAt;
    @ApiModelProperty("过期时间")
    private Date expireAt;
    @ApiModelProperty("是否确认")
    private Boolean confirmed;

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public Boolean getConfirmed() {
        return confirmed;
    }

    public void setConfirmed(Boolean confirmed) {
        this.confirmed = confirmed;
    }

    public Date getExpireAt() {
        return expireAt;
    }

    public void setExpireAt(Date expireAt) {
        this.expireAt = expireAt;
    }

    public Long getRemainSecond() {
        if (expireAt == null) {
            return null;
        }
        return (expireAt.getTime() - System.currentTimeMillis()) / 1000;
    }
}
